<div class="row searchLineWrap">
	<form id="helpCenterForm" name="helpCenterForm" action="${cxt!}/admin/helpMessage/list" method="post" class="form-horizontal" id="helpMessageReplyForm">
		<div class="col-md-12">
			<div class="row">
				<div class="col-md-5">
					<div class="form-group">
						<label class="col-md-5 control-label">${_res["system.startdate"]}</label>
						<div class="col-md-7">
							<input class="form-control layer-date laydate-icon" name="helpMessage.gt_createtime" placeholder="${_res['system.startdate']}" value="${paramMap['helpMessage.gt_createtime']}" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" required aria-required="true"/>
						</div>
					</div>
				</div>
				<div class="col-md-5">
					<div class="form-group">
						<label class="col-md-5 control-label">${_res["system.enddate"]}</label>
						<div class="col-md-7">
							<input class="form-control layer-date laydate-icon" name="helpMessage.le_createtime" placeholder="${_res['system.enddate']}" value="${paramMap['helpMessage.le_createtime']}" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" required aria-required="true" />
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<div class="col-md-12">
			<div class="row">
				<div class="col-md-5">
					<div class="form-group">
						<label class="col-md-5 control-label">${_res["help.center.message.status"]}</label>
						<div class="col-md-7">
							 <#dict type="select" name="helpMessage.f_state"  dictCode="HELP_MESSAGE_STATUS" value="${paramMap['helpMessage.f_state']}"/>
						</div>
					</div>
				</div>
				
				<div class="col-md-2">
					<div class="form-group">
						<% if(hasPrivilegeUrl("helpMessageList")){ %>
							<button type="button" class="btn btn-primary pull-right" onclick="ajaxForm('content','helpCenterForm')">
								<i class="fa fa-search m-l-sm m-r-xs"></i>${_res["system.search"]}
							</button> 
						<% } %>
					</div>
				</div>
			</div>
		</div>
	</form>
</div>

<div class="row searchLineWrap">
	<% if(hasPrivilegeUrl("helpMessageReplyExport")){ %>
       <p>
       	<a href="javascript:void(0);" onClick="downloadAnswer();" class="btn btn-primary pull-left">${_res["system.export"]}</a>
           <div class="clearfix"></div>
       </p>
    <% } %>
	<table class="table table-bordered" id="list-table">
		<thead>
			<tr>
				<th>${_res["help.center.message.comments"]}</th>
				<th>${_res["help.center.message.usertype"]}</th>
				<th>${_res["help.center.message.status"]}</th>
				<th>${_res["help.center.message.email"]}</th>
				<th>${_res["help.center.message.mobilenumber"]}</th>
				<th>${_res["help.center.message.category"]}</th>
				<th>${_res["help.center.message.createtime"]}</th>
				<th>${_res["user.review.processor"]}</th>
			</tr>
		</thead>
		<tbody>
			<% for(helpMessage in splitPage.list!){ 
			 %>
				<tr>
					<td style="background-color: rgb(255, 255, 255);">${helpMessage.comments!}</td>
					<td style="background-color: rgb(255, 255, 255);"><#dict type="lable" value="${helpMessage.usertype!}" name="helpMessage.usertype" dictCode="HELP_USER_TYPE" /></td>
					<td style="background-color: rgb(255, 255, 255);"><#dict type="lable" value="${helpMessage.state!}" name="helpMessage.state" dictCode="HELP_MESSAGE_STATUS" /></td>
					<td style="background-color: rgb(255, 255, 255);">${helpMessage.email!}</td>
					<td style="background-color: rgb(255, 255, 255);">${helpMessage.mobilenumber!}</td>
					<td style="background-color: rgb(255, 255, 255);"><#dict type="lable" value="${helpMessage.category!}" name="helpMessage.category" dictCode="HELP_CATEGORY" /></td>
					<td style="background-color: rgb(255, 255, 255);">${helpMessage.createtime!,dateFormat="yyyy-MM-dd HH:mm"}</td>
					<td style="background-color: rgb(255, 255, 255);">
						<% if(hasPrivilegeUrl("helpMessageAnswer")){
							if(helpMessage.state! == '0'){ %>
							<button type="button" class="btn btn-sm btn-link" onClick="ajaxContent('/admin/helpMessage/answer/${helpMessage.id!}')">
								${_res["help.center.message.answer"]}
							</button>
						<% }
						} 
						if(hasPrivilegeUrl("openHelpMessage")){ 
							if(helpMessage.state! == '1'){%>
								<button type="button" class="btn btn-sm btn-link" onClick="ajaxContent('/admin/helpMessage/open/${helpMessage.id!}')">
									${_res["help.center.messageReply.open"]}
								</button>
						     <% } 
						     if(helpMessage.state! == '0'){%>
								<button type="button" class="btn btn-sm btn-link" onClick="ajaxContent('/admin/helpMessage/close/${helpMessage.id!}')">
									${_res["help.center.messageReply.close"]}
								</button>
						     <%} %>
						<%} %>
						
						<% if(hasPrivilegeUrl("helpMessageDelete")){
						  if(helpMessage.state! != '2'){%>
							<button type="button" class="btn btn-sm btn-link" data-trigger="confirm" onClick="ajaxDelete('/admin/helpMessage/delete/${helpMessage.id!}')">
								${_res["system.delete"]}
							</button>
						<% 
						  }
						 } %>
					</td>
				</tr>
			<% 
			} %>
		</tbody>
	</table>
	<div id="splitPageDiv"><#page formId="helpCenterForm" /></div>
	<#nav />
</div>

 <script>
	 function downloadAnswer(){
	    var url = "/admin/helpMessage/export";
	    var data = "filename=helpMessageReply";
	    ajaxDownload(url,"helpMessageReplyForm",data);
	    return true;
	  };
</script>